import { axiosInstance } from "..";
import { encrypt } from "@/utils/secretKey";


function Login(username: string, password: string) {
  password = encrypt(password)
  return new Promise((resolve, reject) => {
    axiosInstance()
      .post("/test/login/login", { username, password })
      .then(
        (res: any) => {
          resolve(res);
        },
        (error: any) => {
          reject(error);
        }
      );
  });
}

export { Login };
